package com.biz.primus.management.order.degraded;

import com.biz.primus.management.order.feign.StockFeignClient;
import com.biz.primus.model.stock.vo.DepotMeetStockRespVo;
import com.biz.primus.model.stock.vo.NearMeetStockDepotReqVo;
import lombok.extern.slf4j.Slf4j;
import org.springframework.stereotype.Component;

import java.util.LinkedList;
import java.util.List;

/**
 * @author zzy
 * @rema
 * @date 2017/11/14/009
 */
@Component
@Slf4j
public class DegradedStockFeignClient implements StockFeignClient {

    /**
     * 获取指定门店附近满足库存的门店
     * @param reqVo
     * @return
     */
    @Override
    public List<DepotMeetStockRespVo> getNearMeetStockDepots(NearMeetStockDepotReqVo reqVo) {
        DepotMeetStockRespVo depotMeetStockRespVo1 = new DepotMeetStockRespVo();
        DepotMeetStockRespVo depotMeetStockRespVo2 = new DepotMeetStockRespVo();
        depotMeetStockRespVo1.setDepotCode("门店编码1");
        depotMeetStockRespVo2.setDepotCode("门店编码2");
        depotMeetStockRespVo1.setDepotName("门店名称1");
        depotMeetStockRespVo2.setDepotName("门店名称2");
        depotMeetStockRespVo1.setDetailAddress("详细地址1");
        depotMeetStockRespVo2.setDetailAddress("详细地址12");
        depotMeetStockRespVo1.setDistance(500);
        depotMeetStockRespVo2.setDistance(1500);
        depotMeetStockRespVo1.setProductCode("产品编码1");
        depotMeetStockRespVo2.setProductCode("产品编码2");
        depotMeetStockRespVo1.setQuantity(15);
        depotMeetStockRespVo2.setQuantity(152);
        depotMeetStockRespVo1.setDeliverPrice(15641);
        depotMeetStockRespVo2.setDeliverPrice(15640);
        depotMeetStockRespVo1.setEnableExpress(true);
        depotMeetStockRespVo2.setEnableExpress(false);

        List<DepotMeetStockRespVo> result = new LinkedList<>();
        result.add(depotMeetStockRespVo1);
        result.add(depotMeetStockRespVo2);
        return result;
    }
}
